Mix feature flags into fingerprint/metadata shorthash
authorNipunn Koorapati <nipunn@dropbox.com>
Tue, 4 Oct 2016 23:16:30 +0000 (16:16 -0700)
committerNipunn Koorapati <nipunn1313@gmail.com>
Mon, 7 Nov 2016 09:17:56 +0000 (20:17 +1100)
commit530f2dd4175de80ba30ddd7555110b7b9fe7b72b
tree13a409538aaf7d1588ba2b547611cd1759f4ebee
parent14a28afb05b956c6e5ea0d9c706d8c60cf0a6891
Mix feature flags into fingerprint/metadata shorthash

Since building dependencies results in different libraries
depending on the feature flags, I added the feature flags
into the short_hash. This solves an issue when multiple crates
share a target directory or multiple targets share a common
library with divergent feature flag choice.

- Only link binaries, build scripts, and top level deps
- Handle dylibs differently (no metadata filename / linking)
- Fingerprint based on link_dst rather than file_stem.

This (sadly) limits the effects of dep caching to things
which don't produce a hard-link. Currently, this is only dependent
library crates. Stil a big win.
18 files changed:
src/cargo/core/manifest.rs
src/cargo/ops/cargo_clean.rs
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/fingerprint.rs
src/cargo/ops/cargo_rustc/layout.rs
src/cargo/ops/cargo_rustc/mod.rs
tests/bench.rs
tests/build-script.rs
tests/build.rs
tests/clean.rs
tests/cross-compile.rs
tests/freshness.rs
tests/git.rs
tests/path.rs
tests/plugins.rs
tests/run.rs
tests/rustc.rs
tests/test.rs